package cn.kongwg.demo01;

import java.io.*;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author kongwg
 * @create 2021-05-23 11:05
 */
public class SeDemo {

    private static BigDecimal bigDecimal = new BigDecimal("1.01");
    private static BigDecimal bigDecimal2 = new BigDecimal("0.01");


    public static void main(String[] args) {
        short i = 1;
        i += 1;
        i++;
        //i = (i + 1);

        String[] s = new String[]{
                "dog", "lazy", "a", "over", "jumps", "fox", "brown", "quick", "A"
        };
        List<String> list = Arrays.asList(s);
        Collections.reverse(list);
        s = list.toArray(new String[0]);//没有指定类型的话会报错
        System.out.println("s = " + Arrays.toString(s));


//        List l = new ArrayList(Arrays.asList(1, 2, 3));
//        boolean add = l.add(2);
//        int [] myArray2 = { 1, 2, 3 };
//        Arrays.stream(myArray2).boxed().collect(Collectors.toList());
//        List list = Arrays.asList(1, 2, 3);
//        String s = list.get(1);
//        System.out.println("s = " + s);


//        BigDecimal subtract = bigDecimal.subtract(bigDecimal2);
//        System.out.println("subtract = " + subtract);
//
//        String[][] strings = {{},{}};
//        try (BufferedInputStream bin = new BufferedInputStream(new FileInputStream(new File("test.txt")));
//             BufferedOutputStream bout = new BufferedOutputStream(new FileOutputStream(new File("out.txt")))) {
//            int b;
//            while ((b = bin.read()) != -1) {
//                bout.write(b);
//            }
//        } catch (IOException e) {
//            e.printStackTrace();
//        }

    }
}
